﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HRM.DAL.DAO;
using HRM.DAL.Gateway;

namespace HRM.BLL
{
    public class PunishmentTypeManager
    {
        PunishmentTypeGateway gateway=new PunishmentTypeGateway();
        public string SavePunishedType(PunishmentType punishmentType)
        {
            if(gateway.HasThisTypeExist(punishmentType))
            {
                return "The Punishement Name Already Exist, Try another";
            }
            else
            {
                return gateway.SavePunishedType(punishmentType);
            }
        }

        public List<PunishmentType> GetAllPunishmentType()
        {
            return gateway.GetAllPunishmentType();
        } 

        public string DeletePunishType(int Id)
        {
            return gateway.DeletePunishType(Id);
        }
    }
}